{include file="../../../application/admin/view/public/head" /}
<div class="page-container p10">
<style>
    .layui-form-label{width: auto}
</style>
    <div class="my-toolbar-box" >
        <div class="center mb10">
            <form class="layui-form " action="{:url()}" method="post">
                <div class="layui-input-inline">
                    <label for="app_id" class="layui-form-label">选择应用
                    <select class="layui-select" id="app_id" name="app_id">
                        <option value="">全部</option>
                        {foreach $applists as $appId =>$appName}
                        <option value="{$appId}"
                                {if $appId == $param.app_id}
                                selected
                                {/if}
                        >{$appName}</option>

                        {/foreach}
                    </select></label>
                </div>
                <div class="layui-input-inline">
                    <label for="days" class="layui-form-label">有效登陆天数
                        <input class="layui-input" id="days" name="days" type="number" value="{$param.days|default=5}"/></label>
                </div>
                <div class="layui-input-inline">
                    <label for="vod_name" class="layui-form-label">影片数量
                        <input class="layui-input" id="vod_name" name="vod_num" type="number" value="{$param.vod_num|default=0}"/></label>
                </div>
                <div class="layui-input-inline">
                    <label for="zhibo_name" class="layui-form-label">直播数量
                        <input class="layui-input" id="zhibo_name" name="zhibo_name" type="number" value="{$param.zhibo_name|default=0}"/></label>
                </div>
                <button class="layui-btn mgl-20 j-search" >查询</button>
                <button type="submit" class="layui-btn" lay-submit="" lay-filter="formSubmit" data-child="true">保 存</button>
            </form>
        </div>
        <blockquote class="layui-elem-quote">
            查询得到设备数量为 {$total}
        </blockquote>
    </div>
    <form class="layui-form " method="post" id="pageListForm">
        <table class="layui-table" lay-size="sm">
            <thead>
            <tr>
                <th >设备号</th>
                <th >设备名称</th>
                <th >注册时间</th>
                <th >影片数目</th>
                <th >直播数目</th>
                <th >有效登陆天数</th>
            </tr>
            </thead>

            {volist name="list" id="vo"}
            <tr>
                <td >{$vo.device_id}</td>
                <td >{$vo.device_name}</td>
                <td >{$vo.time_added|mac_day=color}</td>
                <td >{$vo.vod_num}</td>
                <td >{$vo.zhibo_num}</td>
                <td >{$vo.reg_days}</td>
            </tr>
            {/volist}
            </tbody>
        </table>

        <div id="pages" class="center"></div>
    </form>
</div>

{include file="../../../application/admin/view/public/foot" /}


<script type="text/javascript">
    var curUrl="{:url('review/info',$param)}";
    layui.use(['laypage', 'layer','laydate'], function() {
        var laypage = layui.laypage
            , layer = layui.layer,laydate=layui.laydate;
        laydate.render({
            elem: '#date'
            ,type: 'date'
        });
        laypage.render({
            elem: 'pages'
            ,count: {$total}
            ,limit: {$limit}
            ,curr: {$page}
            ,layout: ['count', 'prev', 'page', 'next', 'limit', 'skip']
            ,jump: function(obj,first){
                if(!first){
                    location.href = curUrl.replace('%7Bpage%7D',obj.curr).replace('%7Blimit%7D',obj.limit);
                }
            }
        });
    });
</script>
</body>
</html>